package com.haredot.service;

import com.haredot.dto.PermissionTree;
import com.haredot.entity.Role;
import com.haredot.vo.PageVo;
import com.haredot.vo.R;

import java.util.List;
import java.util.Map;

public interface RoleService {
    R<?> saveRole(Role role);

    R<?> updateRole(Role role);

    R<?> removeRole(Long id);

    R<?> batchRemoveRoles(List<Long> roleIds);

    R<PageVo> queryRolesByPage(PageVo pageVo, Map<String, Object> searchParams);

    R<PermissionTree> queryPermissionTree(Long roleId);

    R<?> bindPermission(Long roleId, List<PermissionTree> nodes);
}
